package com.kaifamiao.www.demo.do0904;


import java.util.Collection;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;

public class Mapdemo {

    public void print(Map<String, Object> map) {

       Set<String> keyset = map.keySet();

        Collection<Object> values = map.values();
        Iterator key = keyset.iterator();
        Iterator value = values.iterator();
        while (key.hasNext()){
            while (value.hasNext()){
                System.out.println(key.next()+ "--" + value.next());
            }
        }



        //        Set<String> strings = map.keySet();
//        for (String key : strings) {
//            System.out.println(key + map.get(key));
//        }
    }
}
